import http from '../index';

export const getFileSystem = (
  root?: string,
  pattern?: string,
  page?: string,
  pageSize?: string,
) => {
  let path = `/fs?root=${root ? root : '/'}`;
  path += pattern ? `&pattern=${pattern}` : '';
  path += page ? `&page=${page}` : '';
  path += pageSize ? `&pageSize=${pageSize}` : '';
  return http.get(path);
};
